console.log('start');
const promise1 = Promise.resolve("1");
const promise2 = Promise.resolve("2");
const promise3 = new Promise(resolve => {
    console.log('promise3');
    resolve("3");
})

setTimeout(() => {
    console.log('setTimeout');
    const promise4 = Promise.resolve("4");
    promise4.then(res => {
        console.log(res);
    })
},0)
setTimeout(() => {
    console.log('setTimeout2');
},0)

promise1.then(res => {
    console.log(res);
})
promise2.then(res => {
    console.log(res);
})
promise3.then(res => {
    console.log(res);
})

console.log('end');